<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 箭头函数
    // function plus(a) {
    //   return a + 1
    // }
    // console.log(plus(10))

    // const plus = (a, b) => {
    //   console.log('plus invoked')
    //   return a + b
    // }
    // console.log(plus(1,2))
    
    const arr = [1,2,3,4,5,6,7]
    // const arr1 = arr.filter(function (item) {
    //   return item % 2
    // })
    const arr1 = arr.filter(i => i % 2)
    console.log(arr1)
  </script>
</body>
</html>